<?php
 /*
    
    Copyright (C)  2012 Sweta ray.
    Permission is granted to copy, distribute and/or modify this document
    under the terms of the GNU Free Documentation License, Version 1.3
    or any later version published by the Free Software Foundation;
    with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
    A copy of the license is included in the section entitled "GNU
    Free Documentation License"
	@license GNU/GPL http://www.gnu.org/copyleft/gpl.html
    Questions for Joomla
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>
   
	Questions Search Plugin for Question Component
	Version 0.0.1
	Created date: Jan 2013
	Creator: Sweta Ray
	Email: admin@phpseo.net
	support: support@phpseo.net
	Website: http://www.phpseo.net
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Script file of JFUploader plugin
 */
class plgSearchQuestionssearchInstallerScript
{ 
  function install($parent) { 
     // I activate the plugin
	$db = JFactory::getDbo();
     $tableExtensions = $db->nameQuote("#__extensions");
     $columnElement   = $db->nameQuote("element");
     $columnType      = $db->nameQuote("type");
     $columnEnabled   = $db->nameQuote("enabled");
     
     // Enable plugin
     $db->setQuery("UPDATE $tableExtensions SET $columnEnabled=1 WHERE $columnElement='questionssearch' AND $columnType='plugin'");
     $db->query();
     
     echo '<p>'. JText::_('QUESTIONSSEARCH_PLUGIN_ENABLED') .'</p>';    
  } 
}
?>